home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / interface / AdminSocket.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  2KB  |  72 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // AdminSocket.h: Schnittstelle fⁿr die Klasse CAdminSocket.
  20. //
  21. //////////////////////////////////////////////////////////////////////
  22.  
  23. #if !defined(AFX_ADMINSOCKET_H__4FDF0C68_9EA7_440B_A4ED_2DC358E4A054__INCLUDED_)
  24. #define AFX_ADMINSOCKET_H__4FDF0C68_9EA7_440B_A4ED_2DC358E4A054__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. #include "../AsyncSocketEx.h"
  31.  
  32. class CMainFrame;
  33. class CAdminSocket : public CAsyncSocketEx  
  34. {
  35. public:
  36.     CString m_Password;
  37.     BOOL IsConnected();
  38.     BOOL SendCommand(int nType);
  39.     BOOL SendCommand(int nType, void *pData, int nDataLength);
  40.     BOOL ParseRecvBuffer();
  41.     virtual void Close();
  42.     CAdminSocket(CMainFrame *pMainFrame);
  43.     virtual ~CAdminSocket();
  44.     void DoClose();
  45.     bool IsClosed() { return m_bClosed; }
  46.     bool IsLocal();
  47.  
  48. protected:
  49.     struct t_data
  50.     {
  51.         unsigned char *pData;
  52.         DWORD dwOffset;
  53.         DWORD dwLength;
  54.     };
  55.     std::list<t_data> m_SendBuffer;
  56.  
  57.     bool m_bClosed;
  58.     virtual void OnReceive(int nErrorCode);
  59.     virtual void OnConnect(int nErrorCode);
  60.     virtual void OnSend(int nErrorCode);
  61.     virtual void OnClose(int nErrorCode);
  62.     CMainFrame *m_pMainFrame;
  63.  
  64.     unsigned char *m_pRecvBuffer;
  65.     unsigned int m_nRecvBufferLen;
  66.     unsigned int m_nRecvBufferPos;
  67.  
  68.     int m_nConnectionState;
  69. };
  70.  
  71. #endif // !defined(AFX_ADMINSOCKET_H__4FDF0C68_9EA7_440B_A4ED_2DC358E4A054__INCLUDED_)
  72.